<li id="<%= dom_id record %>">
  <dl class="record columns">
    <dt class="column">
      <% unless record.leaf? || record.root? %>
        <span class="toggle">
        <% if children.blank? %>
          <%= link_to '+', resource.member_path(record, :action => :expand), :remote => true %>
        <% else %>
          <%= link_to '–', resource.member_path(record, :action => :collapse), :remote => true %>
        <% end %>
        </span>
      <% end %>
      <span class="handle">⇅</span>
      <% tree_fields.each do |field| -%>
        <span><%= field.render :tree, controller, record %></span>
      <% end -%>
    </dt>
    <dd class="column">
      <%= link_to 'edit', resource.edit_path(record) if update_fields.present? %>
      <% controller._members.each do |member| %>
        <%= link_to member.label, resource.member_path(record, :action => member.action) if member.display? %>
      <% end %>
      <%= link_to 'destroy', resource.member_path(record), :confirm => "Are you sure?", :method => :delete if configuration.destroy %>
    </dd>
  </dl>
  <%= children %>
</li>
